<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增论文积分')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-papercfg-add" >
        <div class="form-group">
            <label class="col-sm-3 control-label">论文分类：</label>
            <div class="col-sm-8">
                <select  name="order" id="order" class="form-control" th:with="type=${@dict.getType('sci_paper_k')}" required>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="form-group" >
            <label class="col-sm-3 control-label">项目负责人：</label>
            <div class="col-sm-8">
                <select  name="user_order" id="user_order" class="form-control" th:with="type=${@dict.getType('sci_paper_qwer')}" required>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">积分：</label>
            <div class="col-sm-8">
                <input name="points" class="form-control" type="text" required>
            </div>
        </div>
    </form>
</div>
<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()">  保 存</button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()">  关 闭 </button>
    </div>
</div>

<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: datetimepicker-js" />

<script th:inline="javascript">
    var prefix = ctx + "system/papercfg"
    $("#form-paper-add").validate({
        focusCleanup: true
    });
    function submitHandler() {
        if ($.validate.form()) {
            console.log("dadadd",$('#form-papercfg-add'));
            $.operate.saveTab(prefix + "/add", $('#form-papercfg-add').serialize());
        }
    }

    $("input[name='publicationTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

</script>
</body>
</html>